const http = require('http');
// 创建options对象，包含目标URL、请求头等信息
const options = new URL('http://192.168.134.3:90/myget');

// 发起HTTP请求
const req = http.request(options, (res) => {
  let data = '';
  res.on('data', (chunk) => {
    data += chunk;
  });
  res.on('end', () => {
    console.log(`Response body: ${data}`);
  });
});

req.on('error', (err) => {
  console.error(`Error: ${err.message}`);
});

req.end(); // 结束请求并开始传输数据